<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	    <script type="text/javascript" charset="utf-8" src="Public/ueditor1_4_3/ueditor.config.js"></script>
    		<script type="text/javascript" charset="utf-8" src="Public/ueditor1_4_3/ueditor.all.min.js"> </script>
    		<script type="text/javascript" charset="utf-8" src="Public/ueditor1_4_3/lang/zh-cn/zh-cn.js"></script>
	</head>
	<body>
		<form action="" method="post" enctype="multipart/form-data">
		<div class="alert alert-success">修改文章</div>
		<div class="form-group">
			<label for="exampleInputEmail1">文章标题</label>
			<input value="{{$oldData['title']}}" id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类名称"  name="title">
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">作者</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类名称"  name="author" value="{{$oldData['author']}}">
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">所属分类</label>
			<select name="category_cid" class="form-control">
				{{foreach from="$catedata" value="$v"}}
				<option value="{{$v['cid']}}" {{if value="$oldData['category_cid']==$v['cid']"}}selected{{endif}} >{{$v['_name']}}</option>
				{{endforeach}}
			</select>
		</div>
		<script src="Public/jquery-1.8.2.min.js" type="text/javascript"></script>
		<script type="text/javascript">
			$(function(){
				$('#a').click(function(){
					var str='<label for="exampleInputEmail1">缩略图</label><input id="exampleInputEmail1" type="file"  name="thumb">';
					$('#img_box').html(str);
				})	
			})
		</script>	
		
		<div class="form-group" id="img_box">
			{{if value="$oldData['thumb']"}}
			<img src="{{$oldData['thumb']}}" alt="" />
			<a id="a" href="javascript:;">x</a>
			<input type="hidden" name="thumb" id="thumb" value="{{$oldData['thumb']}}" />
			{{else}}
			<label for="exampleInputEmail1">缩略图</label>
			<input id="exampleInputEmail1" type="file"  name="thumb">
			{{endif}}
		</div>
		
		
		<div id="">
			<label for="">文章标签</label>
			<br />
			{{foreach from="$tagdata" key="$k" value="$v"}}
			<label  class="checkbox checkbox-inline" for="checkbox{{$v['tid']}}">
				<input name="tid[]" id="checkbox{{$v['tid']}}" class="custom-checkbox" type="checkbox" data-toggle="checkbox" value="{{$v['tid']}}" {{if value="in_array($v['tid'],$tids)"}}checked{{endif}} >
				<span class="icons">
				<span class="icon-unchecked"></span>
				<span class="icon-checked"></span>
				</span>
				{{$v['tname']}}
			</label>
			{{endforeach}}
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">文章摘要</label>
			<textarea name="digest" rows="5" cols=""  class="form-control" placeholder="请输入文章关键字">{{$oldData['digest']}}</textarea>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">文章关键字</label>
			<textarea name="keywords" rows="5" cols=""  class="form-control" placeholder="请输入文章关键字">{{$oldData['keywords']}}</textarea>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">文章描述</label>
			<textarea  name="des" rows="5" cols=""  class="form-control" placeholder="请输入文章描述" >{{$oldData['des']}}</textarea>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">文章正文</label>
			<!--调用百度编辑器-->
			<script name='content' id="editor" type="text/plain" style="width:100%;height:500px;">{{$oldData['content']}}</script>
		    <script>
		        var ue = UE.getEditor('editor');
		    </script>
		</div>
		
		
		<input type="hidden" name="aid" id="aid" value="{{Q('get.aid')}}" />
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
